<template>
	<view >
		<view class="u-f u-f-ajc">
			<view class="walletmain">
				<view class="u-f u-f-ajc u-f-column">
					<navigator url="/pages/client/vipcard/moneylog">
					<view class="iconfont iconicon_pay_balance ft60" style="color: #E93B3D;"></view>
					<view class="wallnum">我的余额</view>
					<view class="flex alcenter space mt15" style="text-align: center;">
						<view class="walletmain13 flex alcenter ft40" style="text-align: center;">￥{{money}}</view>
					</view>
					</navigator>
				</view>
				<view class="wall-btn">
					<button type="primary" style="width: 48%; float: left;" @tap="onZcTap()" >充值</button>
					<button type="primary" style="width: 48%; float: right; background: linear-gradient(to right, #4289d6, #007aff);
}" @tap="onZcTaptx()" >提现</button>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				money:''
			}
		},
		onShow(){
			this.ongrzlTap()
		},
		onNavigationBarButtonTap(e) {
			const index = e.index;
				uni.navigateTo({
					url:"/pages/client/vipcard/moneylog"
				})	
		},
		methods: {
			// 监听原生标题导航按钮点击事件
			
			async ongrzlTap(){
				let _this=this;
				let [err,res] = await this.$httpas.get('/api/user/index',{},{token:true});
				if (!this.$httpas.errorCheck(err,res)) return;
				if(res.data.code === 1){
					this.money=res.data.data.money;
				}else{
					uni.showToast({ title: res.data.msg,icon:"none" });
					this.logining = false;
				}
			},
			onZcTap(){
				uni.navigateTo({
					url:'/pages/client/vipcard/recharge'
				})
			},
			onZcTaptx(){
				uni.navigateTo({
					url:'/pages/client/member/tx'
				})
			},
		}
	}
</script>

<style>
/* 	page{
		background: #ffffff;
	} */
.iconfinancial_fill{
	font-size: 89px;
	color: #F17503;
	height: 120px;
	background-image: -webkit-gradient(linear, left top, left bottom, from(#ffac45), to(#F17503));
    background-image: -o-linear-gradient(top, #ffac45, #F17503);
    background-image: linear-gradient(to bottom, #ffac45, #F17503);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.wallnum{
	font-size: 28upx;
	color: #3a3a3a;
}
.walletmain{
	width: 70%;
	margin: auto;
	text-align: center;
	padding-top: 40%;
}
.walletmain12{
	font-size: 42px;
	font-weight: bold;
	position: relative;
	display: flex;
	padding-left: 40upx;
	letter-spacing: 2upx;
}
.walletmain13{
	content: '￥';
	font-weight: bold;
	margin: auto;
}
.wall-btn{
	width: 100%;
}
.wall-btn button{
	width: 100%;
	margin: 30px auto;
	display: block;
	border: none!important;
	background: -webkit-linear-gradient(left, #f49315 , #f17503); /* Safari 5.1 - 6.0 */
	background: -o-linear-gradient(right, #f49315, #f17503); /* Opera 11.1 - 12.0 */
	background: -moz-linear-gradient(right, #f49315, #f17503); /* Firefox 3.6 - 15 */
	background: linear-gradient(to right, #f49315 , #f17503); /* 标准的语法（必须放在最后） */
}
</style>
